<!--
  Generated template for the BillPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
      <ion-buttons start>
          <button ion-button (click)="dismissCLI()">
            <img src="assets/img/back.png" width='15' height='20'>
          </button>
      </ion-buttons>
    <ion-title>账单</ion-title>
    <ion-buttons end (click)="gotoRecorde()" *ngIf="notCos">
      <button ion-button>
        提现记录
      </button>
    </ion-buttons>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <div *ngIf="vip">
      <ion-list>
          <!-- <h3>消费者账单</h3> -->
          <ion-item *ngFor="let item of billList3;let i =index" (click)="gotoBillDetail3(item)">
            <ion-avatar item-start>
              <img src="{{picrooturl}}{{item.img}}" width="15px" height="10px">
            </ion-avatar>
            <p>{{item.service_name}}</p>
            <span class="date">{{item.pay_time}}</span>
            <div item-end>
                <p>-&nbsp;{{item.order_price}}</p>
                <span class="kind">购买服务</span>
            </div>
          </ion-item>
        </ion-list>
        <p *ngIf="bottom3" class="bot">已经到底啦~</p>
        <ion-infinite-scroll (ionInfinite)="doInfinite1($event)">
          <ion-infinite-scroll-content
            loadingSpinner="bubbles"
            loadingText="正在加载...">
          </ion-infinite-scroll-content>
        </ion-infinite-scroll>
  </div>
  <div *ngIf="nail">
    <ion-list>
      <!-- <h3>美甲师账单</h3> -->
      <ion-item *ngFor="let item of billList;let i =index" (click)="item.pass_flag?null:gotoBillDetail(item)">
        <ion-avatar item-start>
          <img src="{{picrooturl}}{{item.buyer_avator}}" width="15px" height="10px">
        </ion-avatar>
        <p class="name">{{item.buyer_name}}</p>
        <span class="date">{{item.pay_time}}</span>
        <div item-end>
            <p *ngIf="!item.pass_flag">+&nbsp;{{item.order_price}}</p>
            <p *ngIf="item.pass_flag">-&nbsp;{{item.order_price}}</p>
            <span class="kind" *ngIf="!item.pass_flag">售出款式</span>
            <span class="kind red" *ngIf="item.pass_flag == 0">审核中</span>
            <span class="kind" *ngIf="item.pass_flag == 1">已提现</span>
        </div>
      </ion-item>
    </ion-list>
    <p *ngIf="bottom" class="bot">已经到底啦~</p>
    <ion-infinite-scroll (ionInfinite)="doInfinite2($event)">
      <ion-infinite-scroll-content
        loadingSpinner="bubbles"
        loadingText="正在加载...">
      </ion-infinite-scroll-content>
    </ion-infinite-scroll>
  </div>  
    <div *ngIf="shop">
        <!-- <h3>美甲店账单</h3>   -->
        <ion-list class="shop">
          <ion-item *ngFor="let value of billList2;let i =index" (click)="value.pass_flag?null:gotoBillDetail2(value)">
              <ion-avatar item-start>
                  <img src="{{picrooturl}}{{value.user_avator}}" width="15px" height="10px">
              </ion-avatar>
              <p class="name">{{value.user_name}}</p>
              <span class="date">{{value.pay_time}}</span>
              <div item-end>
                  <p>{{value.order_price}}</p>
                  <span class="kind" *ngIf="!value.pass_flag && value.order_price.indexOf('+') != -1">售出服务</span>
                  <span class="kind" *ngIf="!value.pass_flag && value.order_price.indexOf('-') != -1">购买款式</span>
                  <span class="kind red" *ngIf="value.pass_flag == 0">审核中</span>
                  <span class="kind" *ngIf="value.pass_flag && value.pass_flag == 1">已提现</span>
              </div>
          </ion-item>
        </ion-list>
        <p *ngIf="bottom2" class="bot">已经到底啦~</p>
        <ion-infinite-scroll (ionInfinite)="doInfinite3($event)">
          <ion-infinite-scroll-content
            loadingSpinner="bubbles"
            loadingText="正在加载...">
          </ion-infinite-scroll-content>
        </ion-infinite-scroll>
    </div>

  
</ion-content>
